home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5888 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.6 KB

  1. Path: qualcomm.com!usenet
  2. From: nabbasi@qualcomm.com (Nasser Abbasi)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: programming in the large. C++ vs Ada . was: Re: C/C++ knocks the crap out of Ada
  5. Date: 7 Feb 1996 10:37:31 GMT
  6. Organization: QUALCOMM
  7. Message-ID: <4f9vdb$p1g@qualcomm.com>
  8. References: <4etcmm$lpd@nova.dimensional.com> <JSA.96Feb7021245@organon.com>
  9. NNTP-Posting-Host: nabbasi.qualcomm.com
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.93.14
  12.  
  13.  
  14.  
  15. JRFisher (jrfisher@aol.com) wrote:
  16. > :...
  17. > : Truth is, Ada has its strengths and is (for certain projects) 
  18. > : far superior to any other structured language. Ada is particularly
  19. > : good for large-scale development because a few systems engineers can 
  20.  
  21. Elliot replied:
  22.  
  23. > Setting responsibility interfaces is also the correct way for large, or
  24. > complex projects using C++.  It is also easy to specify such interfaces
  25. > using C++.  
  26.  
  27.  
  28. I think some of the language experts out there need to summarize to us 
  29. why Ada is considered better for large projects than C++.
  30.  
  31. It seems to me the most important part to have a language 
  32. considered suitable for large applications is the ability to 
  33. separate the interface from the implementation and things like 
  34. separate compilation. and to a lesser extent the ability 
  35. to do code reuse through taking advantage of inheritance 
  36. (i.e. child classes can share code from common parent  class as an 
  37. example) or though use of generic packages or templates. 
  38.  
  39.  
  40. It seems to me that both Ada and C++ both do the above, so 
  41. why exactly is it that Ada is considered to be better than
  42. C++ for large applications? 
  43.  
  44. Ada provides public interface that clients can build against, even
  45. before the implementation (body) part of the package of the 
  46. interface is available.
  47.  
  48. Also in C++, clients can #include the .h file for the class they
  49. wish to interface to, clients can look at the public part of the
  50. class to see what the interface looks like, and code against that 
  51. (offcourse they can also  see the private part but if one can use
  52. access that part of the class (legally), no harm is done!
  53.  
  54. Ada does strong type checking to make sure the client call is
  55. consistent with what the package public interface is declared as.
  56. In C++, it also does type checking (I guess somewhat less strongly
  57. than Ada, because the primitives data types in C/C++ (short,long,char 
  58. etc..) are all implicitly interchangeable with each others), and
  59. because it seems one can cast anything to anything, but still, 
  60. C++ does do good type checking. 
  61.  
  62. Ada supports separate compilation, it also support child packages which 
  63. is nice feature to allow one to expand a package without having those 
  64. using the parent package to recompile if they do not use the new child 
  65. package (I think that how  I understand it to work). 
  66.  
  67. In C++, It also support separate compilation. in C++, there is no such 
  68. thing as a package. in C++ the class is the master of everything, 
  69. In Ada, the package is, and the tagged types (i.e. the C++ equivalent
  70. to  class) lives inside the package. So, Ada has one higher construct 
  71. which  is a package, but I am not sure how that makes Ada more suitable 
  72. for very large applications...
  73.  
  74. I think a nice thing would be to make a table listing the attributes
  75. that are considered important for programming in the large, and give a 
  76. grade to each language in that department (may be a weighted grade 
  77. depending how important that attribute is), and add the score at the end, 
  78. and see who wins :)
  79.  
  80. I know this must have been talked about before, and there is I am sure 
  81. papers written about programming in the large, but I was interested to 
  82. know more about the differences in Ada and C++ in this aspect. 
  83.  
  84.  
  85. thanks
  86. Nasser
  87.  
  88.